home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 18211 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.3 KB  |  35 lines

  1. Newsgroups: comp.lang.c++
  2. Path: vixen.cso.uiuc.edu!uchinews!news
  3. From: Charles Fiterman <cef@geodesic.com>
  4. Subject: Re: String operator+ and memory leakage.
  5. X-Nntp-Posting-Host: ford.uchicago.edu
  6. Message-ID: <Dq3zr9.GBn@midway.uchicago.edu>
  7. Sender: news@midway.uchicago.edu (News Administrator)
  8. Organization: Geodesic Systems
  9. References: <4l5fok$feo@utopia.hacktic.nl>
  10. Date: Fri, 19 Apr 1996 12:23:33 GMT
  11.  
  12. In article <4l5fok$feo@utopia.hacktic.nl>,
  13. Mike Tavares  <MIKET@cdynamics.com> wrote:
  14. >I have an implementation (not mine) of the String class that is leaking 
  15. >memory
  16. >during the + operator code.  The code follows:
  17. >
  18. >If I change the method to work in this I mutate one of my addends.  There 
  19. >has to be a way of implementing this without memory leakage! HELP!
  20.  
  21. Strostroup says Garbage collection in C++ is the wave of the future.
  22. And this is a small part of the reason why. All schemes to solve your
  23. problem without garbage collection violate encapsulation in some
  24. ugly way. Indeed Object orientation without garbage collection is
  25. nonsense.
  26.  
  27. You can get a free consrvative collector from Hans Boehm
  28. boehm@parc.xerox.com and like most free stuff its unsupported and
  29. not really a product yet. But for most stuff it works if you will
  30. put in some effort.
  31.  
  32. You can get a supported industrial strength garbage collector
  33. from Geodesic Systems sales@geodesic.com
  34.  
  35.